<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>   
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="pt6" uri="/WEB-INF/tags/platform6.tld"%>
<%@ taglib prefix="sec" uri="/WEB-INF/tags/shiro.tld"%>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="chrome=1">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>添加</title>
	<base href="<%=ViewUtil.getRequestPath(request) %>">
	<%
	Locale locale =SessionHelper.getLocaleByUser(request);
    %>
    <link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
	<jsp:include page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
	<script type="text/javascript" src="avicit/cbb/techclass/tabledefine/commtempletmanager/comm_templet_add.js"></script>
	<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
	<script type="text/javascript">
		var baseurl = '<%=request.getContextPath()%>';
		var dialogId = "${dialogId}"; //打开页面传递的模块ID
	</script>
</head>
<body class="easyui-layout" data-options="region:'center'" fit="true">
<div data-options="region:'north',border:false" style="height: 40px;">
		<div id="toolbar" class="datagrid-toolbar datagrid-toolbar-extend foot-formopera">
			<table class="tableForm" border="0" cellspacing="1" width="100%">
				<tr>
					<td align="left">
						<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_button_resetButton">
							<%-- 重置 --%>
							<a id="resetButton" style="margin-top:17px;margin-left:30px;"  class="easyui-linkbutton selbtn " onclick="resetForm('formAdd', 'add');" href="javascript:void(0);">
							<img  src="avicit/im/lantop/common/search/image/icon_tool039_blue.png">
							<span  class="selbtc"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.reset","i18n.lantop",locale)%></span>
							</a>
						</sec:accesscontrollist>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div region="center" border="false" style="height: 0; overflow: hidden; border: false;">
   		<form id="formAdd" method="post">
       		<input name="parentId" value="${pid}" type="hidden" />
   			<table class="form_commonTable"  style="width:98% !important;margin-left: 1px;">
   				<tr>
   					<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_tempCode">
				  		<%-- 编号 --%>
				  		<th width="15%" align="right"><span class="remind">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.num","i18n.lantop",locale)%>：</th>
				  		<td width="35%">
				  			<input class="easyui-validatebox" title='<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.num","i18n.lantop",locale)%>' type="text" name="tempCode" id="tempCode" 
					  			  data-options="required:true, validType:['length[0,64]', 'specialChars']" ></input>
				  		</td>
       				</sec:accesscontrollist>
       				<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_name">
						<%-- 名称 --%>
						<th width="15%" align="right"><span class="remind">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.name","i18n.lantop",locale)%>：</th>
						<td width="35%">
							<input class="easyui-validatebox" title='<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.name","i18n.lantop",locale)%>' type="text" name="tempName" id="tempName" 
				  				data-options="required:true, validType:['length[0,64]', 'specialChars']" ></input>
						</td>
					</sec:accesscontrollist>
   				</tr>
   				<tr>
   					<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_tempType">
						<c:if test="${type eq 'F' || type eq 'S'}">
							 <th width="15%" align="right"><span class="remind">*</span>类型：</th>
							 <td width="35%">
							 	<select class="easyui-combobox" name="tempType" id="tempType" title="类型" data-options="required:true, editable:false, panelHeight:'auto',onShowPanel:comboboxOnShowPanel">
									   <option value="F">模板夹</option>
		                               <option value="C">模板</option>
								</select>
							 </td>		
						</c:if>	
						<c:if test="${type eq 'O'}">
							<input name="tempType" value="S" type="hidden" />
						</c:if>
					</sec:accesscontrollist>
					<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_tempModelType">
						<%-- 模板类型 --%>
						 <th width="15%" align="right" id="tempModelTypeTh"><span class="remind">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.tempModelType","i18n.lantop",locale)%>：</th>
						 <td width="35%" id="tempModelTypeTd">
						 	<pt6:syslookup name="tempModelType" id="tempModelType" title="模板类型" isNull="false" lookupCode="LANTOP_TEMPLET_MODELTYPE"
								dataOptions="editable:false,panelHeight:'auto',onShowPanel:comboboxOnShowPanel,validType:'extendsIsNull'">
							</pt6:syslookup>
						 </td>		
					</sec:accesscontrollist>
   				</tr>	
   				<tr>
   					<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_sysId">
						  	<c:if test="${type eq 'O' }">
							  	 <%-- 系统标识 --%>
							  	 <th width="18%" align="right"><span class="remind">*</span><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.systemSign","i18n.lantop",locale)%>：</th>
							  	 <td width="82%" colspan="3">
							  	 	<select class="easyui-combobox" name="sysId" id="sysId" title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.systemSign","i18n.lantop",locale)%>" data-options="required:true, editable:false, panelHeight:'auto',onShowPanel:comboboxOnShowPanel">
										<c:forEach items="${commSysInfoList}" var="cs">
											<option value="${cs.id}">${cs.sysName}</option>
										</c:forEach>
									</select>
							  	 </td>
						  	</c:if>	
						  	<c:if test="${type ne 'O'}">
						  		<input name="sysId" value="${sysId}" type="hidden" />
						  		  <th width="15%" align="right"><span class="remind">*</span>系统标识：</th>
								  <td width="85%" class="input-readonly" colspan="3">
									  <input class="easyui-validatebox disabled" title='系统标识' type="text" name="sysName" id="sysName" 
					  						 data-options="required:true, validType:['length[0,64]', 'specialChars']"  value="${sysName}" disabled="disabled"></input>
								  </td>	  	
						  	</c:if>
					</sec:accesscontrollist>
   				</tr>
   				<tr>
   					<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_formAdd_remark">	
			  			<%-- 备注 --%>
			  			<th width="15%" align="right"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.comment","i18n.lantop",locale)%>：</th>
			  			<td colspan="3">
			  			 	<textarea class="textareabox" validType="length[0,255]" style="width:99% !important;"
									invalidMessage="不能超过255个字符！" title="<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.comment","i18n.lantop",locale)%>" name="remark" id="remark"></textarea>
			  			</td>
					</sec:accesscontrollist>
   				</tr>
   			</table>
			<input name="isSysInit" value="Y" type="hidden" />
		</form>
	</div>
	<div data-options="region:'south',border:false" style="height:40px;">
			<table class="tableForm" border="0" cellspacing="1" width="100%">
				<tr>
					<td align="center">
						<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_button_saveButton">
							<%-- 提交 --%>
							<a id="saveButton" class="easyui-linkbutton  selbtn" onclick="saveForm('formAdd', 'saveButton','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.submit.success","i18n.lantop",locale)%>','<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add.submit.failure","i18n.lantop",locale)%>');" href="javascript:void(0);">
							<img src="avicit/im/lantop/documents/Filecollection/img/tick.png">
							<span class="selbtc">确定</span>
							</a>
						</sec:accesscontrollist>
						
						<sec:accesscontrollist  hasPermission="3" domainObject ="commtempletmanager_comm_templet_add_button_backButton">
							<%-- 返回 --%>
							<a id="backButton" style="margin-left:10px;" class="easyui-linkbutton selbtn" onclick="closeWindow();" href="javascript:void(0);">
							<img src="avicit/im/lantop/documents/Filecollection/img/close.png">
							<span>取消</span>
							</a>
						</sec:accesscontrollist>
					</td>
				</tr>
			</table>
		
	</div>
</body>
</html>